// Copyright (c) 2009 Luca Marrocco.
// Modified or written by Luca Marrocco for inclusion with codej.
// Licensed under the Apache License, Version 2.0 (the "License")
package codej.fit.fixtures;

import static codej.gen.Generators.*;
import static codej.source.Languages.*;
import fit.*;

/** @author Luca Marrocco */
public class SourceFixture extends ColumnFixture {

	public String source;

	public String generatedJava() {
		try {
			return clean(generated(java(compile(java(source)))));
		} catch (Throwable t) {
			return t.getMessage();
		}
	}

	public String generatedXml() {
		try {
			return clean(generated(xml(compile(java(source)))));
		} catch (Throwable t) {
			return t.getMessage();
		}
	}
}